package com.lfs.admin.model.vo;

import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * 拼多多商品属性VO
 **/
@Getter
@Setter
public class PddGoodsPropertiesVO {

    private Long vid;
    private String value;

    private Long refPid;
    private List<String> valueUnit;


    @Getter
    public enum NodeDataEnums {

        PP("品牌", "pp"),

        KS("款式", "ks"),

        FG("风格", "fg"),

        BHTZD("保护套质地", "bhtzd"),

        LXYS("流行元素", "lxys"),

        SPECNAME1("自定义规格1", "specName1"),

        SPECNAME2("自定义规格2", "specName2");

        private final String name;

        private final String value;

        NodeDataEnums(String name, String value) {
            this.name = name;
            this.value = value;
        }
    }

    @Getter
    @Setter
    public static class GoodsRulePropertiesItem {
        private Boolean canNote;
        private Integer chooseMaxNum;
        private Integer inputMaxNum;
        private Boolean isImportant;
        private Boolean isSale;
        private Boolean isSku;
        private String maxValue;
        private String minValue;
        private String name;
        private Long parentSpecId;
        private Integer propertyValueType;
        private Long refPid;
        private Boolean required;
        private String requiredRule;
        private Integer requiredRuleType;
        private List<PropertiesItemShowConditionItem> showCondition;
        private Integer valuePrecision;
        private List<String> valueUnit;
        private List<PropertiesItemValuesItem> values;
        public GoodsRulePropertiesItem() {
        }
    }


    @Getter
    @Setter
    public static class PropertiesItemShowConditionItem {
        private Long parentRefPid;
        private List<Long> parentVids;
        public PropertiesItemShowConditionItem() {
        }
    }


    @Getter
    @Setter
    public static class PropertiesItemValuesItem {
        private String extendInfo;
        private List<Long> parentVids;
        private Long specId;
        private String value;
        private Long vid;
        public PropertiesItemValuesItem() {
        }
    }

    // 商品折扣规则
    @Getter
    @Setter
    public static class CatRuleGetResponseTwoPiecesDiscountRule {
        private Boolean ifMustTwoPiecesDiscount;
        private Integer maxTwoPiecesDiscount;
        private Integer minTwoPiecesDiscount;
        private Integer recommendTwoPiecesDiscount;

    }

    // 商品规格
    @Getter
    @Setter
    public static class GoodsSpec {
        private Long parentSpecId;
        private String specName;
        private Long specId;
    }

    // 商品新增
    @Getter
    @Setter
    public static class GoodsAddResponse {
        private Long goodsCommitId;
        private Long goodsId;
        private Long matchedSpuId;
    }

    // 错误信息
    @Getter
    @Setter
    public static class ErrorResponse {
        private String requestId;
        private Integer errorCode;
        private String errorMsg;
        private String subCode;
        private String subMsg;
    }
}
